app.service('getUserByName', function($http) {
    this.login = function (username,pwd2) {
        return  $http.post("/ssm/login",{name:username,pwd:pwd2});
    }
});

app.service('addUser', function($http) {
    this.add = function (username,pwd2) {
        return  $http.post("/ssm/register",{name:username,pwd:pwd2});
    }
});